<div class="ui-block-a"><div class="ui-bar ui-bar-b">Name</div></div>
		<div class="ui-block-b"><div class="ui-bar ui-bar-b">Page Views</div></div>
		<div class="ui-block-c"><div class="ui-bar ui-bar-b">Target Code</div></div>
		<div class="ui-block-d"><div class="ui-bar ui-bar-b">Unique Views</div></div>
		<?php
			include 'functions.php';
			$functions = new functions();
			$jsonAudienceList = $functions->getTopStats();
			asort($jsonAudienceList["stat"]);
			$count = 0;
			foreach( $jsonAudienceList["stat"] as $aud)
			{
				//$audiencesArray[$count] = ($aud["audienceName"]);
				echo '<div class="ui-block-a"><div class="ui-bar ui-bar-c">'.$aud["audienceName"].'</div></div>';
				echo '<div class="ui-block-b"><div class="ui-bar ui-bar-d">'.$aud["pageViews"].'</div></div>';
				if($aud["audienceTargetingCode"] != null){
					echo '<div class="ui-block-c"><div class="ui-bar ui-bar-c">'.$aud["audienceTargetingCode"].'</div></div>';
				}else{
					echo '<div class="ui-block-c"><div class="ui-bar ui-bar-c">n/a</div></div>';
				}
				echo '<div class="ui-block-d"><div class="ui-bar ui-bar-d">'.$aud["uniques"].'</div></div>';
				$count = $count + 1;
				if($count >= 20){
					break;
				}
			}
?>